package com.tfswue.qmp.config;

import com.tfswue.qmp.listener.MyContextListener;
import com.tfswue.qmp.listener.MySessionListener;
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ListenerConfig {
    @Bean
    public ServletListenerRegistrationBean<MyContextListener>myContextListener(){
       return new ServletListenerRegistrationBean<>(new MyContextListener());
    }

    @Bean
    public ServletListenerRegistrationBean<MySessionListener>mySessionListener(){
       return new ServletListenerRegistrationBean<>(new MySessionListener());
    }
}
